package edu.usc.tweetool.hibernate;

/**
 * TopicQueueId entity. @author MyEclipse Persistence Tools
 */

public class TopicQueueId implements java.io.Serializable {

	// Fields

	private Integer userId;
	private Long date;

	// Constructors

	/** default constructor */
	public TopicQueueId() {
	}

	/** full constructor */
	public TopicQueueId(Integer userId, Long date) {
		this.userId = userId;
		this.date = date;
	}

	// Property accessors

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Long getDate() {
		return this.date;
	}

	public void setDate(Long date) {
		this.date = date;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TopicQueueId))
			return false;
		TopicQueueId castOther = (TopicQueueId) other;

		return ((this.getUserId() == castOther.getUserId()) || (this
				.getUserId() != null
				&& castOther.getUserId() != null && this.getUserId().equals(
				castOther.getUserId())))
				&& ((this.getDate() == castOther.getDate()) || (this.getDate() != null
						&& castOther.getDate() != null && this.getDate()
						.equals(castOther.getDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUserId() == null ? 0 : this.getUserId().hashCode());
		result = 37 * result
				+ (getDate() == null ? 0 : this.getDate().hashCode());
		return result;
	}

}